package com.kgdev.cweb.entities.i8n.pkeys;

import java.io.Serializable;
import javax.persistence.*;

/**
 * The primary key class for the i8n_text database table.
 * 
 */
@Embeddable
public class I8nTextPK implements Serializable {
	//default serial version id, required for serializable classes.
	private static final long serialVersionUID = 1L;

	@Column(name="text_key", unique=true, nullable=false, length=45)
	private String textKey;

	@Column(name="lan_code", unique=true, nullable=false, length=45)
	private String lanCode;

    public I8nTextPK() {
    }
	public String getTextKey() {
		return this.textKey;
	}
	public void setTextKey(String textKey) {
		this.textKey = textKey;
	}
	public String getLanCode() {
		return this.lanCode;
	}
	public void setLanCode(String lanCode) {
		this.lanCode = lanCode;
	}

	public boolean equals(Object other) {
		if (this == other) {
			return true;
		}
		if (!(other instanceof I8nTextPK)) {
			return false;
		}
		I8nTextPK castOther = (I8nTextPK)other;
		return 
			this.textKey.equals(castOther.textKey)
			&& this.lanCode.equals(castOther.lanCode);

    }
    
	public int hashCode() {
		final int prime = 31;
		int hash = 17;
		hash = hash * prime + this.textKey.hashCode();
		hash = hash * prime + this.lanCode.hashCode();
		
		return hash;
    }
}